<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>企业信息完善</title>
    <!-- <link rel="stylesheet" type="text/css" href="../css/api.css" /> -->
    <style>
        /*企业信息完善*/

        * {
            margin: 0;
            padding: 0;
        }

        a {
            text-decoration: none;
        }

        a:hover {
            text-decoration: none;
        }

        ul,
        li {
            list-style-type: none;
        }

        html,
        body {
            width: 100%;
            height: 100%;
            font-family: Arial;
            background-color: #fcfcfc;
            font-size: 18px
        }

        *,
        *:after,
        *:before {
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
        }

        #wrap {
            height: 100%;
            display: -webkit-box;
            display: -webkit-flex;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-flex-flow: column;
            flex-flow: column;
        }

        #main {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            flex: 1;
            padding: 20px;
            overflow-x: hidden;
            overflow-y: scroll;
        }

        #header {
            background-color: #fe6263;
        }

        .pcc_header {
            width: 100%;
            /*height: 2.2rem;*/
            display: flex;
        }

        .pcc_header .pcc_return {
            width: 4rem;
            height: 2.2rem;
            background: url("../image/retun-icon.png")no-repeat;
            background-size: 0.6rem;
            background-position: 0.7rem center;
        }

        .pcc_header .pcc_title {
            width: 12rem;
            height: 2.2rem;
            line-height: 2.2rem;
            color: #ffffff;
            text-align: center;
            font-size: 0.96rem;
        }

        .pcc-formCase .pcc-item {
            width: 100%;
            height: 2.5rem;
            background-color: #f8f8f8;
            border-radius: 5px;
            margin-top: 0.5rem;
            display: flex;
        }

        .pcc-formCase .pcc-item label {
            width: 35%;
            height: 2.5rem;
            line-height: 2.5rem;
            font-size: 0.7rem;
            text-indent: 0.5rem;
            color: #666666;
        }

        .pcc-formCase .pcc-item input {
            width: 85%;
            height: 2.5rem;
            border: 0;
            background: none;
            outline: none;
            font-size: 0.7rem;
            color: #666666;
        }

        .pcc-bntCase {
            width: 100%;
            text-align: center;
            padding-bottom: 0.8rem;
            margin-top: 4rem
        }

        .pcc-bntCase button {
            width: 60%;
            height: 3rem;
            color: #ffffff;
            border: 0;
            font-size: 18px;
            background-color: #fe6263;
            border-radius: 3px;
            box-shadow: #e7e7e7 0 3px 5px 0;
        }

        .pcc_license p {
            height: 2.5rem;
            line-height: 2.5rem;
            font-size: 0.7rem;
            text-indent: 0.5rem;
            color: #666666;
        }

        #pcc_licenseimg {
            width: 35%;
            display: block;
            margin: auto;
        }
    </style>
</head>

<body>
    <div id="wrap">
        <div id="header">
            <div class="pcc_header">
                <a class="pcc_return" href="#" onclick="closeappend();"></a>
                <p class="pcc_title">注册企业信息</p>
                <span style="width:4rem"></span>
            </div>
        </div>
        <div id="main">
            <div class="pcc-formCase">
                <div class="pcc-item">
                    <label class="pcc-nameL">公司注册号：</label>
                    <input class="pcc-name" type="text" id='pcc_company_number' placeholder="请输入公司注册号" maxlength="16" />
                </div>
                <div class="pcc_license">
                    <p>营业执照：</p>
                    <img id='pcc_licenseimg' src="../image/photo-icon.jpg" onclick="license();" alt="">
                </div>
            </div>
            <div class="pcc-bntCase">
                <button class="pcc-login" onclick="nextstep();">下一步</button>
            </div>
        </div>
    </div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">
    apiready = function() {
        var header = $api.byId('header');
        //适配iOS 7+，Android 4.4+状态栏
        $api.fixStatusBar(header);

    };
    //关闭本窗口
    function closeappend() {
        api.closeWin();
    };
    // 选择营业执照
    var imgsrc = '';
    function license() {
        var FNPhotograph = api.require('FNPhotograph');
        FNPhotograph.open({
            path: 'fs://savePath',
            album: true,
            quality: 'medium'
        }, function(ret) {
            if (ret.imagePath) {
                imgsrc = ret.imagePath
                document.getElementById('pcc_licenseimg').src = imgsrc;
                FNPhotograph.close(
                    function(ret) {

                    });
            }
        });
    };
    // 下一步
    var main = $api.byId('main');
    var mainPos = $api.offset(main);
    function nextstep(){
      if ($api.val($api.dom('#pcc_company_number')) == "") { //验证手机号
          api.alert({
              title: '提示',
              msg: '请输入公司注册号！',
          }, function(ret, err) {

          });
          return false;
      }
      if (imgsrc == "") { //验证手机号
          api.alert({
              title: '提示',
              msg: '请选择营业执照照片！',
          }, function(ret, err) {

          });
          return false;
      }
      api.openWin({
          name: 'enterprise_frame',
          url: './enterprise_frame.html',
          pageParam: {
              name: 'test1'
          }
      });
    }
</script>

</html>
